<!--
 * @Author: lp
 * @Date: 2022-01-11 15:36:25
 * @LastEditTime: 2022-05-27 16:51:29
 * @LastEditors: lp 654528967@qq.com
 * @Description: 首页
 * @FilePath: //nien-vue3-admin//src//views//index.vue
-->
<template>
  <div class="container">
    <el-tabs v-model="activeName">
      <el-tab-pane label="首页" name="0"></el-tab-pane>
      <el-tab-pane label="个人主页" name="1"></el-tab-pane>
    </el-tabs>
    <keep-alive>
      <template v-if="activeName === '0'">
        <corporate-reporting />
        <receivable-sum />
      </template>
      <template v-else>
        <personal-page />
      </template>
    </keep-alive>
  </div>
</template>
<script lang="ts" setup>
import { ref, defineAsyncComponent } from 'vue'

const CorporateReporting = defineAsyncComponent(() => import('./components/CorporateReporting.vue'))
const ReceivableSum = defineAsyncComponent(() => import('./components/ReceivableSum.vue'))
const PersonalPage = defineAsyncComponent(() => import('./components/PersonalPage.vue'))

const activeName = ref<string>('1')

</script>
<style lang="less" scoped>
.container {
  width: 100%;
  height: 100%;
  padding: 15px;
}
</style>
